//To reverse an array
class prog22
	{
	public static void main(String [] args)
		{
		int [] arr={34,53,26,36,54};
		int[] arrb=new int[arr.length];
		arrb=revArr(arr);
		displaya(arr);
		displayb(arrb);
		}
	public static int[] revArr(int[] arr)
		{
		int [] rarr=new int[arr.length];
		for(int i=arr.length-1, j=0;i>=0;i--, j++)
			rarr[j]=arr[i];
		return rarr;
		}

	public static void displaya(int[] a)
		{
		System.out.println("The original array is : ");
		for(int i=0;i<a.length;i++)
			System.out.println(a[i]);
		}	
	public static void displayb(int [] b)
		{
		System.out.println("The array after reversal is : ");
		for(int i=0;i<b.length;i++)
			System.out.println(b[i]);
		}
	}